/*
 * Diego Zamboni Latance 			344990
 * Fellipe Augusto Ruiz de Souza 	344796
 * 
 */
package ast;

import java.util.*;

public class LocalVarList extends Statement {

	public LocalVarList() {
		localList = new ArrayList<Variable>();
	}

	public void addElement(Variable v) {
		localList.add(v);
	}

	public Iterator<Variable> elements() {
		return localList.iterator();
	}

	public int getSize() {
		return localList.size();
	}

	public void genKrakatoa(PW pw) {
		pw.printIdent(localList.get(0).getType().getKrakatoaName() + " ");
		localList.get(0).genKrakatoa(pw);

		for (int i = 1; i < localList.size(); i++) {
			pw.print(", ");
			localList.get(i).genKrakatoa(pw);
		}
		pw.print(";\n");
	}

	private ArrayList<Variable> localList;

	public void genC(PW pw) {

	}

}
